package paperockscissors;

import java.util.ArrayList;
import java.util.List;

public class Player {
	private String name;
	private int score;
	private List<RPSEnum> enumList;
	private int numRPSElement;
	
	public Player(String name, List<RPSEnum> enumList)
	{
		numRPSElement = enumList.size();
		this.name = name;
		this.enumList = enumList;
	}
	
	public Player(String name)
	{
		this.name = name;
		numRPSElement = 10;
		enumList = new ArrayList<RPSEnum>(numRPSElement);
		
		int rand = 0;
		
		for(int i = 0; i < enumList.size(); i++)
		{
			rand = (int)(Math.round(Math.random()*3));
			if(rand == 0)
				enumList.add(RPSEnum.ROCK);
			else if(rand == 1)
				enumList.add(RPSEnum.PAPER);
			else if(rand == 2)
				enumList.add(RPSEnum.SCISSORS);
		}
	}
	
	public String getName() {
		return name;
	}

	public int getNumRPSElement() {
		return numRPSElement;
	}

	public int getScore() {
		return score;
	}
	
	public void setScore() {
		this.score = score;
	}
	
	public RPSEnum getNextMove(int movePosition) {
		return enumList.get(movePosition + 1);
	}
}
